.class Lcom/brixd/niceapp/ui/SearchBox$3;
.super Ljava/lang/Object;
.source "SearchBox.java"

# interfaces
.implements Landroid/view/View$OnTouchListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/brixd/niceapp/ui/SearchBox;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/brixd/niceapp/ui/SearchBox;

.field final synthetic val$l:Landroid/view/View$OnTouchListener;


# direct methods
.method constructor <init>(Lcom/brixd/niceapp/ui/SearchBox;Landroid/view/View$OnTouchListener;)V
    .registers 3
    .param p1, "this$0"    # Lcom/brixd/niceapp/ui/SearchBox;

    .prologue
    .line 96
    iput-object p1, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->this$0:Lcom/brixd/niceapp/ui/SearchBox;

    iput-object p2, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->val$l:Landroid/view/View$OnTouchListener;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .registers 8
    .param p1, "v"    # Landroid/view/View;
    .param p2, "event"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v2, 0x0

    .line 100
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v3

    packed-switch v3, :pswitch_data_6c

    .line 114
    :cond_8
    iget-object v3, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->val$l:Landroid/view/View$OnTouchListener;

    if-eqz v3, :cond_12

    .line 115
    iget-object v2, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->val$l:Landroid/view/View$OnTouchListener;

    invoke-interface {v2, p1, p2}, Landroid/view/View$OnTouchListener;->onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z

    move-result v2

    .line 118
    :cond_12
    :goto_12
    return v2

    .line 102
    :pswitch_13
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    float-to-int v1, v3

    .line 103
    .local v1, "curX":I
    invoke-virtual {p1}, Landroid/view/View;->getWidth()I

    move-result v3

    iget-object v4, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->this$0:Lcom/brixd/niceapp/ui/SearchBox;

    # getter for: Lcom/brixd/niceapp/ui/SearchBox;->mDeleteDrawable:Landroid/graphics/drawable/Drawable;
    invoke-static {v4}, Lcom/brixd/niceapp/ui/SearchBox;->access$000(Lcom/brixd/niceapp/ui/SearchBox;)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    invoke-virtual {v4}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v4

    sub-int/2addr v3, v4

    if-le v1, v3, :cond_8

    iget-object v3, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->this$0:Lcom/brixd/niceapp/ui/SearchBox;

    # getter for: Lcom/brixd/niceapp/ui/SearchBox;->mThis:Lcom/brixd/niceapp/ui/SearchBox;
    invoke-static {v3}, Lcom/brixd/niceapp/ui/SearchBox;->access$100(Lcom/brixd/niceapp/ui/SearchBox;)Lcom/brixd/niceapp/ui/SearchBox;

    move-result-object v3

    invoke-virtual {v3}, Lcom/brixd/niceapp/ui/SearchBox;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_8

    .line 104
    iget-object v3, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->this$0:Lcom/brixd/niceapp/ui/SearchBox;

    # getter for: Lcom/brixd/niceapp/ui/SearchBox;->mThis:Lcom/brixd/niceapp/ui/SearchBox;
    invoke-static {v3}, Lcom/brixd/niceapp/ui/SearchBox;->access$100(Lcom/brixd/niceapp/ui/SearchBox;)Lcom/brixd/niceapp/ui/SearchBox;

    move-result-object v3

    const-string v4, ""

    invoke-virtual {v3, v4}, Lcom/brixd/niceapp/ui/SearchBox;->setText(Ljava/lang/CharSequence;)V

    .line 105
    iget-object v3, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->this$0:Lcom/brixd/niceapp/ui/SearchBox;

    # getter for: Lcom/brixd/niceapp/ui/SearchBox;->mThis:Lcom/brixd/niceapp/ui/SearchBox;
    invoke-static {v3}, Lcom/brixd/niceapp/ui/SearchBox;->access$100(Lcom/brixd/niceapp/ui/SearchBox;)Lcom/brixd/niceapp/ui/SearchBox;

    move-result-object v3

    invoke-virtual {v3}, Lcom/brixd/niceapp/ui/SearchBox;->getInputType()I

    move-result v0

    .line 106
    .local v0, "cacheInputType":I
    iget-object v3, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->this$0:Lcom/brixd/niceapp/ui/SearchBox;

    # getter for: Lcom/brixd/niceapp/ui/SearchBox;->mThis:Lcom/brixd/niceapp/ui/SearchBox;
    invoke-static {v3}, Lcom/brixd/niceapp/ui/SearchBox;->access$100(Lcom/brixd/niceapp/ui/SearchBox;)Lcom/brixd/niceapp/ui/SearchBox;

    move-result-object v3

    invoke-virtual {v3, v2}, Lcom/brixd/niceapp/ui/SearchBox;->setInputType(I)V

    .line 107
    iget-object v2, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->this$0:Lcom/brixd/niceapp/ui/SearchBox;

    # getter for: Lcom/brixd/niceapp/ui/SearchBox;->mThis:Lcom/brixd/niceapp/ui/SearchBox;
    invoke-static {v2}, Lcom/brixd/niceapp/ui/SearchBox;->access$100(Lcom/brixd/niceapp/ui/SearchBox;)Lcom/brixd/niceapp/ui/SearchBox;

    move-result-object v2

    invoke-virtual {v2, p2}, Lcom/brixd/niceapp/ui/SearchBox;->onTouchEvent(Landroid/view/MotionEvent;)Z

    .line 108
    iget-object v2, p0, Lcom/brixd/niceapp/ui/SearchBox$3;->this$0:Lcom/brixd/niceapp/ui/SearchBox;

    # getter for: Lcom/brixd/niceapp/ui/SearchBox;->mThis:Lcom/brixd/niceapp/ui/SearchBox;
    invoke-static {v2}, Lcom/brixd/niceapp/ui/SearchBox;->access$100(Lcom/brixd/niceapp/ui/SearchBox;)Lcom/brixd/niceapp/ui/SearchBox;

    move-result-object v2

    invoke-virtual {v2, v0}, Lcom/brixd/niceapp/ui/SearchBox;->setInputType(I)V

    .line 109
    const/4 v2, 0x1

    goto :goto_12

    .line 100
    nop

    :pswitch_data_6c
    .packed-switch 0x1
        :pswitch_13
    .end packed-switch
.end method
